Generate Report

The Generate Report Action allows the user to run a report from within a business rule and save its results in a CSV or PDF file. More specifically, it saves the results of a single Report View with the "Export File" designation; currently, only Table-style views can have this designation, and so the contents of the saved CSV/PDF file will correspond to the columns defined for the table. The following screenshot shows how to assign the "Export File" designation to a table view.

The "Generate Report" action panel has access to all the report views in the account with the "Export File" designation. In the below example, the only such view is the one created above. On this panel, the user can enter values for all the criteria defined within the chosen report. The user can also enter information about how the system will save and format the report: he or she can specify whether to save the report as a PDF or CSV file, specify a formatting template from the document library to use, and select a time zone with which to time stamp the file. The user can then choose whether to save this file as a Document-type local variable in the routine, save it as a document in the document library, or both. Each has its advantages: if the action saves the file as a local variable, later actions within the routine can store the document within an object in a Document-type field; if the action saves the file in the document library, users can navigate to the document library and manually access the file, and the file can be referenced by name in the "Attachments" field of an email notification.

An example flow of generating a report and sending it in an email notification to users is shown in the pictures below:

In this example, a report is generated and saved in the document library with the name " AFE". The routine will check if this document exists, and if so, trigger the "Run Report" event type, which contains an email notification that includes a document titled " AFE" from the document library as an attachment. The system then sends this notification to all members of the distribution list titled "Test team".